<template>
  <div class="bigbox">
    <ul class="navul">
      <li>全城</li>
      <li>品牌</li>
      <li>特色</li>
    </ul>
    <div class="box">
      <ul>
        <li
          class="cinemasList"
          v-for="(item, index) in cinemalist"
          :key="index"
        >
          <div class="cinemaName">
            <span>{{ item.nm }}</span
            ><span>{{ item.sellPrice }}</span
            ><span>元起</span>
          </div>
          <div class="cinemaLocal">{{ item.addr }}</div>
          <div class="cinemaCard">
            <span class="gaiqian">改签</span>
            <span class="zheko">折扣卡</span>
            <span class="xiaochi">小吃</span>
          </div>
          <div
            class="cinemaBuyCard"
            v-show="item.promotion.cardPromotionTag !== ''"
          >
            <div>
              <img
                src="	https://i.maoyan.com/images/dpmmweb/cinemaList/img/base/base64/card.png"
                alt=""
              />
            </div>
            <span>{{ item.promotion.cardPromotionTag }}</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";

import axios from "axios";

export default {
  name: "YingYuan",
  data() {
    return {
      cinemalist: [],
      yingyuanlist: [],
    };
  },
  computed: {
    ...mapState(["cityObj"]),
  },
  mounted() {
    axios
      .get(
        "/ajax/moreCinemas?movieId=0&day=2022-07-20&offset=0&limit=20&districtId=-1&lineId=-1&hallType=-1&brandId=-1&serviceId=-1&areaId=-1&stationId=-1&item=&updateShowDay=true&reqId=1658301008913&cityId=" +
          this.cityObj.id +
          "&optimus_uuid=9114AF20E18311ECBEDE09F8D93088D0D08E0B8D7AE34BF581F9067C116BE9CA&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        this.cinemalist = res.data.cinemas.cinemas;
        console.log(this.cinemalist);
      });
  },
};
</script>

<style lang="less" scoped>
.bigbox .box ul,
.bigbox .box ul > li {
  list-style: none;
  background: #fff;
}

.navul {
  display: flex;
  width: 100%;
  justify-content: space-around;
  height: 40px;
  line-height: 50px;
  color: #777777;
  font-size: 13px;
  position: fixed;
  top: 155px;
  background: #fff;
}

.navul::after {
  content: "";
  display: block;
  width: 350px;
  height: 1px;
  background: #e8e8e8;
  position: absolute;
  bottom: 0px;
}

.navul li {
  position: relative;
  width: 30%;
  text-align: center;
}

.navul li:nth-child(1):after,
.navul li:nth-child(2):after {
  content: "";
  display: block;
  width: 1px;
  height: 20px;
  background: #e8e8e8;
  position: absolute;
  right: 0px;
  top: 9px;
}
.box {
  margin-top: 194px;
}
// .box ul li {
//   display: flex;
//   align-items: flex-start;
// }
.cinemasList {
  border-bottom: 1px solid #e8e8e8;
  padding: 0.4rem 0.4rem;
  // box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: flex-start;
}

.cinemaName {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.cinemaName,
.cinemaLocal,
.cinemaCard {
  margin-bottom: 5px;
}

.cinemaName > span:nth-child(1) {
  height: 0.46rem;
  line-height: 0.46rem;
  font-size: 0.4267rem;
  color: #000;
}

.cinemaName > span:nth-child(2) {
  color: #f03d37;
  font-size: 0.48rem;
  // margin-right: 0.1333rem;
}

.cinemaName > span:nth-child(3) {
  color: #f03d37;
  font-size: 0.32rem;
}

.cinemaLocal {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  color: #666666;
  font-size: 0.3467rem;
}

.cinemaBuyCard {
  vertical-align: top;
}

.cinemaBuyCard span {
  color: #999;
  font-size: 0.32rem;
}

.cinemaBuyCard div {
  width: 0.4rem;
  height: 0.3733rem;
  display: inline-block;
}

.cinemaBuyCard div img {
  width: 100%;
}

.cinemaCard {
  display: inline-block;
  padding: 0 0.06rem;
  border-radius: 0.04rem;
  font-size: 0.17rem;
}

.gaiqian,
.d4DX,
.IMAX,
.dubi,
.jumu {
  color: #589daf;
  border: 0.02rem solid #589daf;
}

.zheko,
.xiaochi {
  color: #f90;
  border: 0.02rem solid #f90;
}
</style>